<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>CSS Grid Example</title>
  <style>
    .grid-container {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      /* 创建三列，每列相等 */
      grid-template-rows: auto;
      /* 创建一行，高度自动 */
      gap: 10px;
      /* 网格项之间的间距 */
    }

    .grid-item {
      background-color: #3498db;
      padding: 20px;
      color: white;
      text-align: center;
    }
  </style>
</head>

<body>
  <div class="grid-container">
    <div class="grid-item">1</div>
    <div class="grid-item">2</div>
    <div class="grid-item">3</div>
    <div class="grid-item">4</div>
    <div class="grid-item">5</div>
    <div class="grid-item">6</div>
  </div>
</body>

</html>